package com.yc.service;

import com.yc.web.bean.AddressDTO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface AddressService {
    /**
     * 查看地址列表
     * @param userId
     * @return
     */
    List<AddressDTO> listAddress(Long userId);

    /**
     * 添加地址
     * @param userId
     * @param addressDTO
     * @return
     */
    AddressDTO addAddress(Long userId, AddressDTO addressDTO);

    /**
     * 更新地址
     * @param userId
     * @param addressDTO
     */
    void updateAddress(Long addressId, Long userId, AddressDTO addressDTO);

    /**
     * 软删除地址
     * @param addressId
     */
    void softDeleteAddress(Long addressId);

    /**
     * 设置默认地址
     * @param userId
     * @param addressId
     */
    void setDefaultAddress(Long userId, Long addressId);
}
